﻿@using MockSchoolManagement.Extensions

@{
    ViewBag.Title = "学生详情";
   // var photoPath  = "~/images" + (Model.PhotePath??"noimage.png");
    var photoPath = "~/images/noimage.png";
    if (Model.PhotePath != null)
    {
        photoPath = "~/images/avatars/one/" + Model.PhotePath;
    }

}

<h1>@ViewBag.PageTitle</h1>
<div class="row justify-content-center m-3">
    <div class="col-sm-6">
        <div class="card">
            <div class="card-header">
                <h1>@Model.Name</h1>
            </div>
            <div class="card-body text-center">
                <img src="@photoPath" class="card-img-top" asp-append-version="true" />
                <h4>学生ID：@Model.Id</h4>
                <h4>邮箱：@Model.Email</h4>
                <h4>主修科目：@Model.Major</h4>
            </div>
            <div class="card-footer text-center">
                <a asp-controller="home" asp-action="index" class="btn btn-primary">返回</a>
                <a href="#" class="btn btn-primary">编辑</a>
                <a href="#" class="btn btn-danger">删除</a>
            </div>
        </div>
    </div>
    
</div>

